Java Parsing Collection XML JSON: Map List XML JSON Transform by hu yang

Java Parsing Collection XML JSON: Map List XML JSON Transform by hu yang

Author:hu, yang [hu, yang]
Language: eng
Format: azw3
Published: 2019-04-18T16:00:00+00:00


System.out.println(result);

} catch (Exception e) {

e.printStackTrace();

}

}

}

Result:

5. Create a TestMethodParameter.java , method call with parameter

package com.reflection;

import java.lang.reflect.Method;

public class TestMethodParameter {

public static void main(String[] args) {

try {

Class clazz = Class.forName("com.entity.Product");

Object obj = clazz.newInstance();

//Calling a method with parameters setName

Method method = clazz.getMethod("setName", new Class[] { String.class });

Object result = method.invoke(obj, new Object[] { "Easy Learning Java" });



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.